# -*- encoding : utf-8 -*-
class UserMailer < ActionMailer::Base
  default from: "minhtunguyenqt@gmail.com"
  
  def notice_create_account(user, passw)
    @user = user
    @password = passw
    mail :to => @user.email, :subject => "Notice about creating account at Library University Of Technology"
  end
  
  def reset_passw(user, new_passw)
    @user = user
    @new_passw = new_passw
    mail :to => @user.email, :subject => "Reset Password"
  end
  
  def change_passw(user)
    @user = user
    mail :to => @user.email, :subject => "Change Password"
  end
  
  def remind_reader_to_borrow_book(user, reserved_book)
    @user = user
    @reserved_book = reserved_book
    mail :to => @user.email, :subject => 'Notice about the availability of book' 
  end
end
